<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
request.setAttribute("basePath", basePath);
String baseInfoJson= (String)request.getAttribute("baseInfoJson");
String hospitalVisitJson= (String)request.getAttribute("hospitalVisitJson");
String diseaseDiagInfoJson= (String)request.getAttribute("diseaseDiagInfoJson");
String cureInfoJson= (String)request.getAttribute("cureInfoJson");
String provincesList= (String)request.getAttribute("provincesList");
String operateInfoJson= (String)request.getAttribute("operateInfoJson");
String success= (String)request.getAttribute("success");
%>
<link rel="stylesheet" href="${basePath}/assets/bootstrap/css/bootstrap.css"/>    
<link rel="stylesheet" href="${basePath}/assets/css/medical_record/home_page.css"/>
<link rel="stylesheet" href="${basePath}/assets/css/basic.css"/>
<link rel="stylesheet" href="${basePath}/assets/jquery-ui/jquery-ui.css"/>


<script type="text/javascript" src="${basePath}/assets/js/jquery/jquery.min.js"></script>
<script type="text/javascript" src="${basePath}/assets/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="${basePath}/assets/jquery-ui/jquery-ui.js"></script>
<script type="text/javascript" src="${basePath}/assets/layer/layer.js"></script>
<script type="text/javascript" src="${basePath}/assets/js/medical_record/home_page.js"></script>
<script type="text/javascript" src="${basePath}/assets/js/medical_record/edit_basic_info.js"></script>

<script type="text/javascript" src="${basePath}assets/js/echarts.js"></script>




<script type="text/javascript" src="${basePath}/assets/My97DatePicker/WdatePicker.js"></script>
<input type="hidden" id="basePath" value="${basePath }">
<form action="${basePath}/report/editBedRelatedIndicatorsForm"
	method="post" id="bedRateUserForm">
<input type="hidden" id="month" name="month" value="${month}">
<table style="width:100%;" cellpadding="0" cellspacing="0" id="table">
<tbody>
	
	<tr>
		<td colspan="6" style="text-align:right;">
			<input type="button" value="导出" class="btn"  onclick="exportDiagTop20Word()"/>
			 <input type="button" value="保存" class="btn"  onclick="saveDiagTop20()"/>
		</td>
	</tr>
	
	  <tr>
				<td class="tdLabel_7 ">全院编码总数</td>
				<td class="tdLabel_8">
					<input type="text"  value="${diagTop20OrderInfo.totalOutNum}"    title='' />
				</td>
				<td class="tdLabel_7">前20顺位编码总数</td>
				<td class="tdLabel_8">
					<input type="text"  value="${diagTop20OrderInfo.top20TotalOutNum}" />	
				</td>
				<td class="tdLabel_7">前20顺位占比</td>
				<td class="tdLabel_8">
					<input type="text"  value="${diagTop20OrderInfo.top20TotalOutNumRate}" />
				</td>
				
				</tr>

			
			<tr>
			   <td class="tdLabel_7">文本</td>
				<td class="tdLabel_8" colspan="8">
					<textarea style="width:95%;height:150px" id="top20OrderText">${diagTop20OrderInfo.top20OrderText}</textarea>
				</td>
			</tr>
			
			<tr>
			   <td class="tdLabel_7">说明</td>
				<td class="tdLabel_8" colspan="8">
					<textarea style="width:95%;height:150px" id="top20OrderNote">${diagTop20OrderInfo.top20OrderNote}</textarea>
				</td>
			</tr>
			
			
			<tr>
			 
			
				<td class="tdLabel_8" colspan="6" style="width:780px">
					<div style="height:auto;">
							<table style="width:990px; margin:0 auto; float:left; border-collapse:collapse;" cellpadding="0" cellspacing="0">
		
							<thead>
							<tr>
								<td colspan="8" style="text-align:center;font-size:16px;">
									${statisticalReportParam.statics1Name}月出院患者疾病诊治顺位
								</td>
							</tr>
				
							<tr>
								<td class="tdLabel_4" width="8%">顺位</td> 
								<td class="tdLabel_4" width="10%">编码</td> 
								<td class="tdLabel_4" width="15%">名称</td>
								<td class="tdLabel_4" width="10%">数量</td>
								<td class="tdLabel_4" width="10%">构成比</td>
								<td class="tdLabel_4" width="10%">死亡例数</td>
								<td class="tdLabel_4" width="10%">平均住院天数</td>
								<td class="tdLabel_4" width="15%">人均住院费用</td>
								
							</tr>
							</thead>
							<tbody >
				              <c:forEach var="diagTop"   items="${diagTop20OrderInfo.top20diagOrderRecords}">
								<tr>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.topOrder}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagCode}"/></td> 
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagName}"/></td> 
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagNum}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagNumRate}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.deathNum}"/></td> 
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.avgInHospDays}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.avgCostFee}"/></td>
					           </tr>
                              </c:forEach>
							</tbody>
							</table>
						</div>
				</td>
			</tr>
			
			
			<tr>
			 
			
				<td class="tdLabel_8" colspan="6" style="width:780px">
					<div style="height:auto;">
							<table style="width:990px; margin:0 auto; float:left; border-collapse:collapse;" cellpadding="0" cellspacing="0">
		
							<thead>
							<tr>
								<td colspan="8" style="text-align:center;font-size:16px;">
									${statisticalReportParam.statics2Name}月出院患者疾病诊治顺位
								</td>
							</tr>
				
							<tr>
								<td class="tdLabel_4" width="8%">顺位</td> 
								<td class="tdLabel_4" width="10%">编码</td> 
								<td class="tdLabel_4" width="15%">名称</td>
								<td class="tdLabel_4" width="10%">数量</td>
								<td class="tdLabel_4" width="10%">构成比</td>
								<td class="tdLabel_4" width="10%">死亡例数</td>
								<td class="tdLabel_4" width="10%">平均住院天数</td>
								<td class="tdLabel_4" width="15%">人均住院费用</td>
								
							</tr>
							</thead>
							<tbody >
				              <c:forEach var="diagTop"   items="${diagTop20OrderInfo.preMonthtop20diagOrderRecords}">
								<tr>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.topOrder}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagCode}"/></td> 
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagName}"/></td> 
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagNum}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagNumRate}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.deathNum}"/></td> 
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.avgInHospDays}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.avgCostFee}"/></td>
					           </tr>
                              </c:forEach>
							</tbody>
							</table>
						</div>
				</td>
			</tr>
			
			
			
			
			<tr>
			 
			
				<td class="tdLabel_8" colspan="6" style="width:780px">
					<div style="height:auto;">
							<table style="width:990px; margin:0 auto; float:left; border-collapse:collapse;" cellpadding="0" cellspacing="0">
		
							<thead>
							<tr>
								<td colspan="8" style="text-align:center;font-size:16px;">
									${statisticalReportParam.statics3Name}出院患者疾病诊治顺位
								</td>
							</tr>
				
							<tr>
								<td class="tdLabel_4" width="8%">顺位</td> 
								<td class="tdLabel_4" width="10%">编码</td> 
								<td class="tdLabel_4" width="15%">名称</td>
								<td class="tdLabel_4" width="10%">数量</td>
								<td class="tdLabel_4" width="10%">构成比</td>
								<td class="tdLabel_4" width="10%">死亡例数</td>
								<td class="tdLabel_4" width="10%">平均住院天数</td>
								<td class="tdLabel_4" width="15%">人均住院费用</td>
								
							</tr>
							</thead>
							<tbody >
				              <c:forEach var="diagTop"   items="${diagTop20OrderInfo.lastYeartop20diagOrderRecords}">
								<tr>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.topOrder}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagCode}"/></td> 
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagName}"/></td> 
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagNum}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagNumRate}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.deathNum}"/></td> 
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.avgInHospDays}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.avgCostFee}"/></td>
					           </tr>
                              </c:forEach>
							</tbody>
							</table>
						</div>
				</td>
			</tr>
			
			
			
			
		
			

			
		</tbody>
</table>
	

</form>





<script>
     //导出word文件
     function  exportDiagTop20Word (){
     	 window.location.href ="${basePath}/report/exportDiagTop20Word";
     }

     //保存
     function saveDiagTop20(){
	    var top20OrderText = $("#top20OrderText").val();
	    var top20OrderNote = $("#top20OrderNote").val();
	    $.ajax({
	        type:"post",
	        url:"${basePath}/report/saveDiagTop20",
	        data:{top20OrderText:top20OrderText,top20OrderNote:top20OrderNote},
	        success:function(data){
	        	if(data.success){
	        		layer.alert(data.msg,{icon:1});
           			return;
           		}else{
           			layer.alert(data.msg,{icon:1});
           		    return;
           		}
	        }
	    })
		

     }

 

	
</script>